package com.aptech.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.aptech.dao.EmailOperateDao;
import com.aptech.model.Email;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class EmailOperate extends ActionSupport {
	
	//通过Email对象来获取页面属性
	private Email email;
	
	//查看邮箱
	public String selectEmail(){
		
		HttpServletRequest request=ServletActionContext.getRequest();
		//调用EmailDao层的查询方法，查询出的多个Email对象，放入到List中并存放到request
		EmailOperateDao emailDao=new EmailOperateDao();
		List<Email> emails=emailDao.LookEmail();
		request.setAttribute("emails", emails);
		return SUCCESS;
	}
	
	//阅读邮件
	public String readEmail(){
		
		
		return null;
	}
}
